Skip to content

Release v4.1#424

Open
akru wants to merge 132 commits intomasterfrom
release/4.1
Open

Release v4.1#424
akru wants to merge 132 commits intomasterfrom
release/4.1

Conversation

@akru
Copy link
Member

@akru akru commented Dec 1, 2025

Description

Runtime Enhancements

  • Upgraded Polkadot runtime logic with new struct definitions and broad refactoring.
  • Updated runtime migration logic to reflect XCM (Cross-Consensus Messaging) integration, including changes from MultiLocation to new types.
  • Added subxt-api crate: expose robonomics runtime API(subxt based) to rust applications.
  • Added dev-runtime feature to build development only wasm with dev-related pallets and parameters.

Pallet Changes and Improvements

  • Removed pallet-xcm-info across the codebase.
  • Added pallet-parachain-info as the new mechanism for parachain identity and XCM-related logic, updating all references and runtime configs accordingly.
  • Introduced new pallets:
    • pallet-robonomics-cps for IoT/Robotics integration (in development runtime).
    • pallet-robonomics-claim for claim-based workflows.
  • Extended migration and testing features (e.g., via try-runtime) for pallets as needed.

Development Environment

  • Migrated from simple shell.nix to Nix Flakes for declarative and flexible dependency management.
  • Use polkadot.nix overlay to get Polkadot ecosystem tools.
  • Integrated Nix Flakes/cachable builds into CI workflows for improved reliability and speed.
  • Introduced libcps - library and CLI for IoT/Robotics tests and integration.

Test Infrastructure

  • Expanded and improved integration tests: introduced robonet tool based on zombienet-sdk.
  • Replaced older test tools (e.g. polkadot-launch) with new, supported configurations.

Continuous Integration

  • Migrated from cargo test to nextest for more efficient and scalable Rust testing.
  • Enhanced CI caching with Cachix for faster builds and artifact sharing.

The PR brings Robonomics in line with current Polkadot and Substrate best practices, modernizes testing and development environments, and features solid runtime and pallet restructuring.

@akru akru self-assigned this Dec 1, 2025
Copilot AI and others added 6 commits December 1, 2025 21:52
* [CI] fix toolchain and enable cache for nightly

* [CI] fix toolchain

* Initial plan

* Add try-runtime feature and migration module with Location updates

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Apply cargo fmt to fix code formatting

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Address code review feedback: remove unnecessary cloning and unused variable

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Update frame/xcm-info/src/lib.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alexander Krupenkin <mail@akru.me>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: akru <786394+akru@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@akru
Copy link
Member Author

akru commented Dec 6, 2025

@copilot looks like zombienet workfow unable to download polkadot binary, would you check it?

Copy link
Contributor

Copilot AI commented Dec 6, 2025

@akru I've opened a new pull request, #445, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits December 6, 2025 12:59
@akru akru requested a review from Copilot December 24, 2025 06:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces XCM v4 support and comprehensive zombienet-based integration testing infrastructure for the Robonomics parachain. The changes enable cross-chain messaging capabilities and provide automated testing to verify multi-chain functionality.

Key changes:

  • Migration of XCM configuration from v3 to v4 with updated types (Location, Asset, Junction)
  • Addition of zombienet test suite including basic connectivity tests and XCM message passing tests
  • Updated runtime dependencies to polkadot-sdk stable2509-2 versions
  • Implementation of storage migrations for XCM-related pallets

Reviewed changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
runtime/robonomics/src/xcm_config.rs Migrates XCM types from v3 to v4, removes Ethereum bridge transactor, updates pallet configurations
runtime/robonomics/src/lib.rs Enables XCM pallets, adds storage migrations, updates runtime macro to new format
frame/xcm-info/src/lib.rs Updates to XCM v4 Location types, adds comprehensive tests and documentation
frame/xcm-info/src/migration.rs New storage migration for v3→v4 XCM type conversions
scripts/zombienet/*.sh Test infrastructure for automated zombienet-based integration testing
scripts/zombienet/tests/*.js Integration test suite covering network initialization, block production, and XCM messaging
scripts/zombienet/*.md Documentation for test suite usage, configuration, and development
.github/workflows/zombienet.yml CI workflow for automated testing on PRs and pushes
Comments suppressed due to low confidence (1)

scripts/zombienet/tests/xcm-tests.js:1

  • Two issues: (1) X1 should not wrap the junction in an array - it should be a single junction object. (2) The Parachain value should be numeric (1000) not a string ('1000').
/**

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akru
Copy link
Member Author

akru commented Jan 6, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Jan 6, 2026

@akru I've opened a new pull request, #456, to work on those changes. Once the pull request is ready, I'll request review from you.

akru added 2 commits January 6, 2026 16:14
* Added polkadot.nix overlay and import polkadot-sdk as dependencies
* Added robonomics binary and crates as flake packages
* Added Github action to cache nix builds using Cachix
akru and others added 30 commits February 25, 2026 07:54
* Add localnet chain configuration into robonomics binary
* Remove deprecated zombienet js binary from nix flakes
…ate references (#500)

* Initial plan

* Add dependencies for localnet CLI tool

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Implement comprehensive CLI structure with all modules

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Implement CLI with spawn and test commands, remove emoji, add test selection and --no-spawn

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Rename to robonet, add topology selection, comprehensive tests, and README

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Fix NetworkEndpoints::new() usage in health.rs

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Add ASCII logo, rename WithAssethub to Assethub, add log-dir arg, split tests into modules

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Implement robonet: Full-featured CLI for local network testing

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Fix ASCII logo to include final T in ROBONET

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Implement robonet: Full-featured CLI for local network testing

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Implement comprehensive test structures for XCM, CPS, and Claim pallets

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Address review feedback: add test constants, use set_balance, improve foreign asset docs

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Create robonomics-metadata crate and update XCM asset creation to use XCM encoded call

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Introduce dedicated crate for robonomics runtime subxt API

* Implement integration tests using robonomics-runtime-subxt-api: network and claim tests

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Implement XCM tests using robonomics-runtime-subxt-api with simplified structure

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Add comprehensive documentation to subxt-api and clean up metadata crate references

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix robonet compilation, remove js tests

* Add robonet section to repository README

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Apply copilot PR review feedback: fix documentation and code issues

- Fix README examples: remove invalid --persist=false, fix test command syntax
- Remove build.rs reference from libcps README (no longer exists)
- Fix xcm.rs: use collator_ws instead of non-existent collator_1_ws
- Fix network.rs comment: simple topology has 1 collator, not 2
- Replace assert! with anyhow::ensure! in claim tests for better error handling
- Remove unreachable dead code in cps.rs (% 3 check in 0..2 loop)
- Fix README test examples to match actual CLI (no -t flag)
- Update CLI reference in README with correct defaults
- Fix topology description: 1 collator, not 2
- Fix build.rs comment: "meta" not "atem"
- Add TODO comment about disabled XCM tests
- Fix NetworkTopology::Assethub -> AssetHub enum variant
- Fix --persist help text to match actual behavior

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Fix claim robonet test

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: akru <786394+akru@users.noreply.github.com>
Co-authored-by: Alexander Krupenkin <mail@akru.me>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: akru <786394+akru@users.noreply.github.com>
Co-authored-by: akru <786394+akru@users.noreply.github.com>
- Replace dynamic subxt::dynamic::Value with static XCM types from api::runtime_types
- Use api::tx().polkadot_xcm() static API instead of dynamic tx construction
- Replace Unicode arrows (→) with simple ASCII (->)
- Replace fancy box drawing characters (╔ ║ ╚) with simple "==" style
- Use XCM v4 types: Location, Junction, Junctions, Assets, AssetId, Fungibility
- All XCM construction now uses compile-time checked types

Addresses review comments on lines 58 and 73

Co-authored-by: akru <786394+akru@users.noreply.github.com>
- Document use of static XCM v4 types
- Add code examples showing static type construction
- Update XCM message structure section with type-safe examples
- Clarify compile-time safety benefits

Co-authored-by: akru <786394+akru@users.noreply.github.com>
* Update README, split dev-related docs into DEVELOPMENT
* [CI] Use cached binaries in tests workflow, enable cache for benchmarks/try-runtime
* Rename benchmark-pallets -> runtime-benchmarks script
* Cleanup old scripts
* Initial plan

* Add Runtime Upgrade Testing documentation to DEVELOPMENT.md

Co-authored-by: akru <786394+akru@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: akru <786394+akru@users.noreply.github.com>
- Wait for MessageQueue::Processed event on relay chain after upward XCM send
- Wait for MessageQueue::Processed event on parachain after downward XCM send
- Subscribe to finalized blocks on destination chain and check for success
- Add 30 second timeout for event monitoring
- Log success/warning based on event detection

Addresses review comments requesting validation of XCM message execution on destination chains

Co-authored-by: akru <786394+akru@users.noreply.github.com>
…ng static types (#501)

* Initial plan

* Implement comprehensive XCM tests with teleportation

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Remove unused import and add comprehensive XCM test documentation

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Rewrite XCM tests to use static types and consistent ASCII style

- Replace dynamic subxt::dynamic::Value with static XCM types from api::runtime_types
- Use api::tx().polkadot_xcm() static API instead of dynamic tx construction
- Replace Unicode arrows (→) with simple ASCII (->)
- Replace fancy box drawing characters (╔ ║ ╚) with simple "==" style
- Use XCM v4 types: Location, Junction, Junctions, Assets, AssetId, Fungibility
- All XCM construction now uses compile-time checked types

Addresses review comments on lines 58 and 73

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Update documentation to reflect static type usage

- Document use of static XCM v4 types
- Add code examples showing static type construction
- Update XCM message structure section with type-safe examples
- Clarify compile-time safety benefits

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* Complete XCM upward/downward tests

* Add MessageQueue event monitoring for XCM message processing

- Wait for MessageQueue::Processed event on relay chain after upward XCM send
- Wait for MessageQueue::Processed event on parachain after downward XCM send
- Subscribe to finalized blocks on destination chain and check for success
- Add 30 second timeout for event monitoring
- Log success/warning based on event detection

Addresses review comments requesting validation of XCM message execution on destination chains

Co-authored-by: akru <786394+akru@users.noreply.github.com>

* refactor(robonet): update test files to use Network<LocalFileSystem>

Update all test files and test runner to use Network<LocalFileSystem> instead of NetworkTopology:

- Update test function signatures to accept &Network<LocalFileSystem>
- Replace NetworkTopology and NetworkEndpoints with direct Network node access
- Use network.get_node() to retrieve nodes by name (alice, bob, robonomics-collator, asset-hub-collator)
- Use node.ws_uri() to get WebSocket URLs directly
- Update test runner in mod.rs to pass network reference
- Handle optional network in main.rs test command

Files updated:
- tools/robonet/src/tests/xcm.rs
- tools/robonet/src/tests/claim.rs
- tools/robonet/src/tests/cps.rs
- tools/robonet/src/tests/network.rs
- tools/robonet/src/tests/mod.rs
- tools/robonet/src/main.rs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: akru <786394+akru@users.noreply.github.com>
Co-authored-by: Alexander Krupenkin <mail@akru.me>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants